package com.wyzz.hr.pojo.base;

import java.io.Serializable;
import java.util.Date;

import com.wyzz.hr.pojo.Department;
import com.wyzz.hr.pojo.EmpHistOrg;
import com.wyzz.hr.pojo.Employee;
import com.wyzz.hr.pojo.PositionBase;

public abstract class BaseEmpHistOrg implements Serializable {

	public BaseEmpHistOrg() {
		hashCode = 0x80000000;
		initialize();
	}

	public BaseEmpHistOrg(String id) {
		hashCode = 0x80000000;
		setId(id);
		initialize();
	}

	public BaseEmpHistOrg(String id, Employee ehoEmpNo, Department ehoDeptNo,
			PositionBase ehoPbNo, Date ehoValidFrom, Integer ehoIsLatest) {
		hashCode = 0x80000000;
		setId(id);
		setEhoEmpNo(ehoEmpNo);
		setEhoDeptNo(ehoDeptNo);
		setEhoPbNo(ehoPbNo);
		setEhoValidFrom(ehoValidFrom);
		setEhoIsLatest(ehoIsLatest);
		initialize();
	}

	protected void initialize() {
	}

	public Date getEhoValidFrom() {
		return ehoValidFrom;
	}

	public void setEhoValidFrom(Date ehoValidFrom) {
		this.ehoValidFrom = ehoValidFrom;
	}

	public Date getEhoValidTo() {
		return ehoValidTo;
	}

	public void setEhoValidTo(Date ehoValidTo) {
		this.ehoValidTo = ehoValidTo;
	}

	public Integer getEhoIsLatest() {
		return ehoIsLatest;
	}

	public void setEhoIsLatest(Integer ehoIsLatest) {
		this.ehoIsLatest = ehoIsLatest;
	}

	public Employee getEhoEmpNo() {
		return ehoEmpNo;
	}

	public void setEhoEmpNo(Employee ehoEmpNo) {
		this.ehoEmpNo = ehoEmpNo;
	}

	public Department getEhoDeptNo() {
		return ehoDeptNo;
	}

	public void setEhoDeptNo(Department ehoDeptNo) {
		this.ehoDeptNo = ehoDeptNo;
	}

	public PositionBase getEhoPbNo() {
		return ehoPbNo;
	}

	public void setEhoPbNo(PositionBase ehoPbNo) {
		this.ehoPbNo = ehoPbNo;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof EmpHistOrg))
			return false;
		EmpHistOrg empHistOrg = (EmpHistOrg) obj;
		if (null == getId() || null == empHistOrg.getId())
			return false;
		else
			return getId().equals(empHistOrg.getId());
	}

	public int hashCode() {
		if (0x80000000 == hashCode) {
			if (null == getId())
				return super.hashCode();
			String hashStr = (new StringBuilder()).append(getClass().getName())
					.append(":").append(getId().hashCode()).toString();
			hashCode = hashStr.hashCode();
		}
		return hashCode;
	}

	public String toString() {
		return super.toString();
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public static String REF = "EmpHistOrg";
	public static String PROP_EHO_VALID_TO = "ehoValidTo";
	public static String PROP_EHO_DEPT_NO = "ehoDeptNo";
	public static String PROP_EHO_VALID_FROM = "ehoValidFrom";
	public static String PROP_EHO_IS_LATEST = "ehoIsLatest";
	public static String PROP_EHO_EMP_NO = "ehoEmpNo";
	public static String PROP_ID = "id";
	public static String PROP_EHO_PB_NO = "ehoPbNo";
	private int hashCode;
	private String id;
	private Date ehoValidFrom;
	private Date ehoValidTo;
	private Integer ehoIsLatest;
	private Employee ehoEmpNo;
	private Department ehoDeptNo;
	private PositionBase ehoPbNo;

}
